#pragma once

#include "BtSdkCE.h"

class BTManager: public CRfCommPort
{
public:
	virtual ~BTManager();
	static BTManager * GetInstance();
	BOOL Init(BOOL isServer);
	void Stop();
	void Send();

protected:

	void OnDataReceived(void *p_data, UINT16 len);
	void OnEventReceived(UINT32 event_code);
    CBtIf *m_pBtIf;
	CSdpService *m_pSdpService;
	BD_ADDR m_BdAddr;
	CRfCommIf m_RfCommIf;
	BOOL m_isServer;
	BOOL m_isSessionStarted;
	BOOL m_isDsrDtrToggleOn;
	BOOL m_isCtsRtsToggleOn;
	CString		m_service_name;
	CString		m_start_session;
	CString		m_stop_session;
	BOOL DoCreateServiceRecord();

private:
	BTManager();
	static BTManager * instance;
};